import os, sys, time
import requests

folder = 'C:\\Users\\Administrator\\Desktop\\'
if not os.path.exists(folder):
   os.mkdir(folder)

url = 'http://n.sinaimg.cn/news/crawl/117/w550h367/20220417/a3a9-08b2ca6dffe4210149dda424adf0734f.jpg'
fname = url.split('/')[-1]
imgres = requests.get(url)
with open(folder + fname, "wb") as f:
   f.write(imgres.content)
os._exit(0)
